package cn.lili.modules.goods.entity.dto;

import cn.hutool.core.util.StrUtil;
import cn.lili.common.vo.PageVO;
import cn.lili.modules.goods.entity.dos.GoodsBelong;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
public class GoodsBelongDTO  extends PageVO {

    @ApiModelProperty("名称:  如 中国馆、欧洲馆")
    private String belongName;


    public LambdaQueryWrapper<GoodsBelong> toQueryWrapper() {
        LambdaQueryWrapper<GoodsBelong> query = new LambdaQueryWrapper<>();
        query.likeRight(StrUtil.isNotEmpty(belongName),GoodsBelong::getBelongName,belongName);
        return query;
    }
}
